from django.db import models
from django.contrib.contenttypes.models import ContentType

class SimpleComment(models.Model):
    content_type = models.ForeignKey(ContentType)
    object_id = models.IntegerField()
    author_name = models.CharField('Name', max_length=128)
    author_website = models.URLField('Website', null=True, blank=True)
    author_email = models.EmailField('Email', null=True, blank=True)
    author_ipaddress = models.IPAddressField()
    submit_date = models.DateTimeField(auto_now_add=True)
    comment = models.TextField(max_length=3000)
    
    def __unicode__(self):
        return "%s: %s..." % (self.author_name, self.comment[:100])
